package com.headFirstModel.decoratorPattern;

/**
 * 调料:装饰者
 */
public class Soy extends  CondimentDecorator {
    Beverage beverage;

    public Soy(Beverage beverage){
        this.beverage=beverage;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription()+",soy";
    }

    @Override
    public double cost() {
        return 0.30+beverage.cost();
    }
}
